def running():
    event = pygame.event.wait()
    if event.type == pygame.QUIT:
        pygame.quit()
        sys.exit()
    if event.type == MOUSEBUTTONDOWN and event.button == 1:
        turn *= -1
        chessmenpos = (turn,event.pos[0] / (size/3),event.pos[1] / (size/3))
        pos = (event.pos[0] / (size/3),event.pos[1] / (size/3))
        if pos not in board:            
            board.append(pos)          
            chessmen.append(chessmenpos)
